/**
 *
 * @constructor
 */
window.Carousel = window.Carousel || { version: '1.0' }
Carousel.Constant = (function () {
    return {
        //baseApiUrl:"http://test.admin.epg.qiyi.domain/api/",
        baseApiUrl: "/api/",
        thirdUrl_audit_people: "http://lego.iqiyi.com/suggest/audit-people",
        originalUrl: "http://10.23.84.18:8500/",
        thirdUrl_qitan_url: "http://api.t.iqiyi.com/qx_api/resource/get_id_by_name",
        thirdUrl_add_qitan_url: "http://api.t.iqiyi.com/qx_api/resource/add_resource",
        thirdUrl_video_url: "http://lego.iqiyi.com/suggest/simple-video",
        thirdUrl_video_area_url: "http://lego.iqiyi.com/suggest/simple-video-area",
        thirdUrl_album_url: "http://lego.iqiyi.com/suggest/album",
        thirdUrl_album_area_url: "http://lego.iqiyi.com/suggest/album-area",
        thirdUrl_playlist_url: "http://lego.iqiyi.com/suggest/playlist",
        //       thirdUrl_apis_search_url: " http://lego.iqiyi.com/apis/search/search",
        thirdUrl_apis_search_area_url: "http://lego.iqiyi.com/apis/search/search-area",
        //http://lego.iqiyi.com/apis/search/search?page.pageNo=2&page.order=desc&page.orderBy=createTime&t=0&page.pageSize=50&filter_LIKES_displayName=%E5%8D%83%E5%8F%A4
        //http://lego.iqiyi.com/apis/search/search?filter_EQL_albumId=100008685&filter_EQI_pagePublishStatus=1&page.order=desc&page.orderBy=createTime&t=0
        devMode: auth.dev()
    }
})()
Carousel.urlConfig = (function () {
    var useUrl = Carousel.Constant.baseApiUrl;
    var programListUrl = useUrl + "program/list";
    var programAddUrl = useUrl + "program/add";
    var programDelUrl = useUrl + "program/delete";
    var programEditUrl = useUrl + "program/edit";
    var configsUrl = useUrl + "configs";
    var channelListUrl = useUrl + "channel/list";
    var redirectUrl = useUrl + "redirect";
    var channelGetUrl = useUrl + "channel/get";
    var carouselRuleListUrl = useUrl + "carousel/get";
    var carouselRuleDelUrl = useUrl + "carousel/del";
    var carouselRuldAddUrl = useUrl + "carousel/create";
    var programLiveQueryUrl = useUrl + "program/liveQuery";
    var programMoveUrl = useUrl + "program/move";
    var programToggleLockUrl = useUrl + "program/toggleLock";
    var programBatchAddUrl = useUrl + "program/batchAdd";
    var programDaySortUrl = useUrl + "program/daySort";
    var programIndexMoveUrl = useUrl + "program/indexMove";
    var programBatchDelUrl = useUrl + "program/batchDel";
    var platSettingsGetUrl = useUrl + "channel/getPlatSettings";
    var yesterdayEndTimeUrl = useUrl + "program/yesterdayEndTime";
    var automationAddUrl = useUrl + "carousel/automation/add";
    var automationDelUrl = useUrl + "carousel/automation/del";
    var automationListUrl = useUrl + "carousel/automations";
    var automationMoveUrl = useUrl + "carousel/automation/indexMove";
    var automationChangeStatusUrl = useUrl + "carousel/automation/changeStatus";
    var automationMoveByIndexUrl = useUrl + "carousel/automation/indexMove/byIndex";
    function getQiPuBaseUrl(qipuId) {
        var plusUrl = Carousel.Constant.devMode ? "http://qipu-test.qiyi.domain/int/entity/nocache/@.json" : "http://qipu.qiyi.domain/int/entity/nocache/@.json";
        return plusUrl.replace("@", "" + qipuId);
    }

    return {
        programList: programListUrl,
        programAdd: programAddUrl,
        programDel: programDelUrl,
        programEdit: programEditUrl,
        configs: configsUrl,
        channelList: channelListUrl,
        channelGet: channelGetUrl,
        redirect: redirectUrl,
        carouselRuleListUrl: carouselRuleListUrl,
        carouselRuleDelUrl: carouselRuleDelUrl,
        carouselRuldAddUrl: carouselRuldAddUrl,
        programLiveQueryUrl: programLiveQueryUrl,
        programMoveUrl: programMoveUrl,
        programToggleLockUrl: programToggleLockUrl,
        programDaySortUrl: programDaySortUrl,
        programBatchAddUrl: programBatchAddUrl,
        programIndexMoveUrl: programIndexMoveUrl,
        programBatchDelUrl: programBatchDelUrl,
        platSettingsGetUrl: platSettingsGetUrl,
        yesterdayEndTimeUrl: yesterdayEndTimeUrl,
        automationAddUrl: automationAddUrl,
        automationDelUrl: automationDelUrl,
        automationListUrl: automationListUrl,
        automationMoveUrl: automationMoveUrl,
        automationMoveByIndexUrl:automationMoveByIndexUrl,
        automationChangeStatusUrl: automationChangeStatusUrl,
        getQiPuBaseUrl: getQiPuBaseUrl
    }
})();
Carousel.ajaxManager = new AjaxQueue()
Carousel.memo = {}

